FROM openjdk:8u252-jre-slim
MAINTAINER xy9860 <luoxin@xy9860.com>
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENV MYENV dev
ONBUILD EXPOSE 8080
ONBUILD ADD ./target/*.jar /app.jar
ENTRYPOINT ["java", "-server", "-XX:+UnlockExperimentalVMOptions","-XX:+UseCGroupMemoryLimitForHeap" ,"-Xmx2048M", "-Xms2048M", "-Xss256K", "-Xmn1500M", "-XX:MetaspaceSize=256M", "-XX:MaxMetaspaceSize=256M", "-Duser.timezone=GMT+8", "-Dserver.port=8080", "-Dspring.profiles.active=${MYENV}", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/app.jar"]